function byId(id){
	return document.getElementById(id);
}
function setCookie(name, value, time){
	if(time){
		document.cookie = name + "=" + value + "; expires=" + time;
	}else{
		document.cookie = name + "=" + value;
	}
}
function getCookieByName(name){
	var cookieValue = "";
	var search = name + "=";
	var offset;
	var end;
	if(document.cookie.length > 0){
		offset = document.cookie.indexOf(search);
		if (offset != -1){
			offset += search.length;
			end = document.cookie.indexOf(";", offset);
			if (end == -1) end = document.cookie.length;
			cookieValue = unescape(document.cookie.substring(offset, end))
		}
	}
	return cookieValue;
}
